﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;
using System.Text;
using QzEbook.AccessObject;

public partial class admin_TagList : System.Web.UI.Page
{
    private StringBuilder sb;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            BindData();
        }
    }

    private void BindData()
    {
        List<Tag> list = new Tag().selectList();

        sb= new StringBuilder();
        sb.AppendLine("<ul id=\"tagList\">");
        foreach (Tag tag in list)
        {
            sb.AppendFormat("<li><a href=\"###\" onclick=\"addTag('{0}')\" title=\"插入\">{0}({1})</a></li>",tag.Name,tag.Count);
        }
        sb.AppendLine("<ul>");
    }


    protected override void Render(HtmlTextWriter writer)
    {
        writer.Write(sb.ToString());
        base.Render(writer);
    }
}
